import { Input, Form, Col } from 'antd';
interface FormItemInputProps {
    placeholder: string,
    width: number,
    name: string,
    label: string,
    require:boolean,
    type?:string
}
const FormItemInput = (props: FormItemInputProps) => {
    return (
        <Col style={{margin:"16px 0"}}>
            <Form.Item name={props.name} required={props.require} label={props.label}>
                <Input type={props.type ? props.type : 'text'} allowClear placeholder={props.placeholder} style={{ width: props.width}} />
            </Form.Item>
        </Col>
    )
}
FormItemInput.defaultProps = {
    placeholder: "请输入",
    width: 200,
    require:false
}
export default FormItemInput;
export type { FormItemInputProps };